﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 类型转换
{
    class Program
    {
        static void Main(string[] args)
        {
            int n1 = 10;
            int n2 = 3;
            //double d = n2 / n1;//2
            double d = n1*1.0 / n2;
            Console.WriteLine(d);
            //只想要两位小数的办法(占位符）
            Console.WriteLine("{0:0.00}",d);
            Console.ReadKey();
        }
    }
}
